Skip to content

catch_discover_tests: keep EXTRA_ARGS as separate arguments - #3230

Open
lee3Q wants to merge 3 commits into
catchorg:develfrom
lee3Q:fix/discover-tests-extra-args-list
Open

lee3Q wants to merge 3 commits into
catchorg:develfrom
lee3Q:fix/discover-tests-extra-args-list

Conversation

@lee3Q

@lee3Q lee3Q commented Nov 5, 2026

Copy link
Copy Markdown

catch_discover_tests passed EXTRA_ARGS to the generated test command as one quoted value. With EXTRA_ARGS --success --durations yes, the test executable received a single joined argument instead of separate ones. This change expands the list so each element is its own argument.

Tests: the DiscoverTests fixture now uses EXTRA_ARGS --success --durations yes, and VerifyRegistration.py checks the exact arguments after the test filter and runs one registered test through ctest.

Checks run (Linux, GCC 11.4, CMake 3.22.1, Python 3.10.12, single-config -C Debug):

  • Before the change the new check fails (expected 6 arguments, got 4).
  • After the change the DiscoverTests fixture passes (22/22) and the new single-config test passes.

Not run: Windows, multi-config generators, CMake 3.19, CMake 3.27+ DL_PATHS.

Scope: elements of the list are split at semicolons, as with other CMake lists. Preserving a literal escaped semicolon inside one argument was not handled before this change and is not claimed here.

An AI coding assistant helped write and test this change.

lee3Q added 3 commits November 6, 2026 01:26
The runtime test command passed EXTRA_ARGS as one quoted value, so a list such as --success --durations yes reached the test executable as a single argument. Expand the list again so each element is its own argument.
Add EXTRA_ARGS --success --durations yes to the DiscoverTests fixture.
Assert the exact arguments after the test filter and run one registered test with ctest.
@codecov

codecov Bot commented Nov 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.38%. Comparing base (a1a991f) to head (e1e31ba).

Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #3230      +/-   ##
==========================================
- Coverage   91.41%   91.38%   -0.03%     
==========================================
  Files         205      205              
  Lines        9106     9106              
==========================================
- Hits         8324     8321       -3     
- Misses        782      785       +3     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant